package service

import (
	"context"
	"video-api/internal/model/input"
	"video-api/internal/model/out"
)

type IGoodsService interface {
	GetGoodsInfoById(context.Context, *input.GoodsDetail) (*out.Goods, error)
	GetGoodsList(context.Context, *input.GoodsList) ([]*out.Goods, int, error)
	GetGoodsInfoByParam(ctx context.Context, param *input.GoodsDetail) ([]*out.Goods, error)
}

var goodsService IGoodsService

func GoodsService() IGoodsService {
	if goodsService == nil {
		panic("localGoodsService is not initialized")
	}
	return goodsService
}

func RegisterGoodsService(s IGoodsService) {
	goodsService = s
}
